<template>
  <div>
App.vue
  <router-link to="/">首页 </router-link>
  <router-link to="/demo">Demo </router-link>
  <router-link to="/demo2">Demo2 </router-link>
  <button @click="toDemo2">demo2</button>
 <!--路由出口--> 
  
  <router-view></router-view>
  
  </div>
  <div>-----demo------</div>
  <Demo/>
 
</template>
<script setup>
import Demo from '@/views/demo.vue'
import Demo2 from '@/views/demo2.vue';
import router from './router';
const toDemo2 = ()=>{
router.push('./demo2.vue')
}
</script>
<style scoped>
</style>